﻿using System;
using System.Data;
using MyClever.Lib;

namespace MyClever.DefaultPlugins
{
    public class $safeprojectname$ : MissionPlugin
    {
        /*  
         * ########################
         * Package definitions START
         * 
         * Add your packages here!!
         */

        [Package(Direction.Input, "Describe input package here!")]
        enum ExamplePackage
        {
            [Column(typeof(string), "Describe input package columns here!")]
            ExampleColumnName
        }

        /*  
         * Package definitions END
         * ########################
         */
        
        [Plugin(PluginDevStatus.Production, "Describe plugin here!")]
        public $safeprojectname$()
        {
        }

        public override void Initialize()
        {

            //This is the first Function called by the host...
            //Put anything needed to start with here first
        }

        public override void Dispose()
        {
            //Put any cleanup code in here for when the program is stopped
        }

        /// <summary>
        /// Generate new Source-content.
        /// </summary>
        protected override void Work()
        {
            DataTableReader inputPackage = this.GetDataReader(typeof(ExamplePackage));
            while (inputPackage.Read())
            {
                this.AddNewLoggingMessage(typeof(ExamplePackage), String.Format("copy file {0}", inputPackage[ExamplePackage.ExampleColumnName.ToString()].ToString()));
            }
        }
    }
}
